package com.frejoys.common.dto.app;

import com.frejoys.common.dto.common.PageDto;
import com.frejoys.common.util.TimeUtil;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * @author wangzhicheng
 * @version 1.0
 * @date 2024/4/28 14:19
 */
@Data
public class UserWalletLogPageDto extends PageDto {

    @Schema(type = "String", name = "param", description = "用户名或手机号", defaultValue = "张三")
    private String param;

    /**
     * 类型：1.用户下单，2.推广返利，3.业务推广，10.用户提现
     */
    @Schema(type = "Integer", name = "type", description = "类型：200.用户提现", defaultValue = "1")
    private Integer type;

    // 状态(用户提现时：0为申请，1为提现成功)：0等待，1.有效
    @Schema(type = "Integer", name = "status", description = "状态(商家提现时：0为申请，1为提现成功)：0等待，1.有效", defaultValue = "1")
    private Integer status;

    @Schema(type = "String", name = "startTime", description = "创建开始时间", defaultValue = "2023-11-30 12:00:00")
    private String startTime;

    @Schema(type = "String", name = "endTime", description = "创建结束时间", defaultValue = "2023-11-30 12:00:00")
    private String endTime;

    public Integer getStartTime() {
        return startTime == null ? null : TimeUtil.unixTime(startTime);
    }

    public Integer getEndTime() {
        return endTime == null ? null : TimeUtil.unixTime(endTime);
    }

}
